#include "move.h"

MyFrame::MyFrame(const wxString & title)
    : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 130))
{
    wxPanel * panel = new wxPanel(this, -1);

    stx = new wxStaticText(panel, wxID_ANY, _T("Try to Click here."), wxPoint(10, 10), wxSize(200, 30));    stx->Bind(wxEVT_LEFT_DOWN, wxCommandEventHandler(MyFrame::OnClick), this);

    btn = new wxButton(panel, ID_BTN, _T("forlove"), wxPoint(80, 50));
    btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MyFrame::OnClick), this);

    Centre();
}

void MyFrame::OnClick(wxCommandEvent &evt)
{
	int id = evt.GetId();	wxObject* obj = evt.GetEventObject();	wxLogMessage(_T("This is a test."), id);}
